#ifndef PFWIDGET_H
#define PFWIDGET_H

#include "offspinbox.h"

#include "dm/dmstruct.h"
#include "dm/dmenum.h"

#include "adaptivewidgets.h"

class PfWidget : public AWidget
{
    Q_OBJECT
public:
    explicit PfWidget(const XoverType &type, QWidget *parent = nullptr);
    Xover value() const;
public slots:
    void set(const Xover &xover, bool init);
signals:
    void stateChanged(Xover, bool);
private slots:
    void emitStateChanged();
    void blockMemberSignals(bool block);
private:
    const XoverType m_type;
private:
    ALabel *titleLabel;
    ASlider *slider;
    ALabel *freqLabel;
    OffSpinBox *freqSpinBox;
    ALabel *typeLabel;
    AComboBox *typeComboBox;
    ALabel *slopeLabel;
    AComboBox *slopeComboBox;
};

#endif // PFWIDGET_H
